<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //1、for 2、while 3、do while 4、for in 5、 forEach 6、 map 7、 filter
      //8、 reduce 9、some  10、every
      //forEach  for for in map filter reduce
      //一、every:所有都为true 那么结果就为true
      var arr = [true, true, true, true, true, true, true]
      //res的结果是所有都为true的时候才是true,只有一个false 那么就是false
      var res = arr.every(function(item,index,array){
        return item
      })
     console.log(res);

      
      var revolution = [
        { type: '鸡', isHeGe: '合格', serveYear: 10 },
        { type: '鸡', isHeGe: '合格', serveYear: 3 },
        { type: '鸡', isHeGe: '合格', serveYear: 2 },
        { type: '鸡', isHeGe: '合格', serveYear: 10 },
        { type: '鸡', isHeGe: '合格', serveYear: 4 },
        { type: '鸡', isHeGe: '合格', serveYear: 10 },
        { type: '鸡', isHeGe: '合格', serveYear: 5 },
      ]
    var res = revolution.every(item=>{
        return item.isHeGe==='合格'
    })
    console.log(res);
//二、some 只要有一个为true  最终结果就为true  其实就是所有结果||的值
// console.log(Boolean(function(){console.log('1111');}));
var arr= [false,false,false,false,true,false]
var res =  arr.some(item=>{
    return item
})

console.log(res);


    </script>
  </body>
</html>
